#pragma once

#include "../../test.h"
#include "../ErrorOutput.hpp"

namespace header
{
namespace test
{

TEST(ErrorOutput)
{
    Error error1{"0123", "error1", 1, 1};
    EXPECT_EQ("0123\n ^\n error1", ErrorOutput::deal(error1));

    Error error2{"0123", "error2", 2, 0};
    EXPECT_EQ("0123\n  ^\n  error2", ErrorOutput::deal(error2));

    Error error3{"0123", "error3", 1, 3};
    EXPECT_EQ("0123\n ^~~\n error3", ErrorOutput::deal(error3));

    Error error4{"0123", "error4", 4, 5};
    EXPECT_EQ("0123\n    ^\n    error4", ErrorOutput::deal(error4));

    Error error5{"0123", "error5", 4, 0};
    EXPECT_EQ("0123\n    ^\n    error5", ErrorOutput::deal(error5));
}

}   // namespace test
}   // namespace header
